﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;

namespace Home.Domain.Entities.Secondary.Mapping
{
    public class TPCUserInfoMap<TTPCUserInfo> : EntityTypeConfiguration<TTPCUserInfo> where TTPCUserInfo : TPCUserInfo
    {
        public TPCUserInfoMap()
        {
            HasKey(t => t.Id);
            //属性
            Property(t => t.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            Property(t => t.UserName)
                .HasMaxLength(32);
            Property(t => t.PassWord)
                .HasMaxLength(32);
            Property(t => t.Ip)
                .HasMaxLength(16);
            Property(t => t.Email)
                .HasMaxLength(64);
            Property(t => t.Phone)
                .HasMaxLength(32);
        }
    }
}
